package com.hnl.to.wrapper;

import java.io.File;

import com.hnl.to.Attachment;
import com.hnl.util.FileUploadUtil;

public class AttachmentWrapper extends Attachment {
	private File file;
	private String name;
	private String downloadURL;
	private long size;

	public AttachmentWrapper(Attachment attachment) {
		super(attachment);
		file = new File(this.getSystemPath());
		name = file.getName();
		downloadURL = FileUploadUtil.GetDownloadURL(this.getSystemPath());
		size = file.length();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDownloadURL() {
		return downloadURL;
	}

	public void setDownloadURL(String downloadURL) {
		this.downloadURL = downloadURL;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}
}
